package com.xdf.xzymanagementsystem.enums;

/**
 * @program: xzy-management-system
 * @description:
 * @author: 张柯
 * @create: 2021-05-15 11:07
 **/
public enum ConfigIntEnum {
    ALLOW_DELIVERY_DATE_LOWER("是否允许发货计划日期小于当前"),
    MATERIAL_STEP_TIMES("根据BOM填充材料的填充阶数"),
    PURCHASE_ORDER_SUPPLIER_CHECK("采购订单材料供应商是否必须输入"),
    OUT_CHECK("材料出库是否检测库存"),
    DELIVERY_PLAN_CHECK("生成发货计划是否检测数量不超过销售订单数量"),
    ALLOW_DUMP_PRODUCT_CODED_MATERIAL_ORDER_BILL_OUTPUT("是否允许生成材料领料单存货编码去重"),
    ORDER_SAVE_INTERVAL("单据保存时单据日期距离当前的天数");
    private String field;

    public String getField() {
        return field;
    }

    ConfigIntEnum(String field) {
        this.field = field;
    }

    public static ConfigIntEnum get(String name) {
        if (name == null || name.length() <= 0) return null;
        for (ConfigIntEnum e : values()) {
            if (e.getField().equals(name)) return e;
        }
        return null;
    }
}
